<%attr>
	sHead => "new subcategory"
</%attr>
<%init>
	# fields-names and default values. 
	my $fields = { 'name' => 'name', 'cat_id' => 'category' };
	my @categories = $m->comp('../dao/category_dao.mi:findAll', entity_name => 'subcategory', fields => $fields);
	
	my $field_constraints = { 'cat_id' => \@categories };
	$m->comp('../view/new.mi', entity_name => 'subcategory', fields => $fields, field_constraints => $field_constraints);
</%init>